package main

import "fmt"

type SayHallo interface {
	say()
}

type Chinese struct{}
type American struct{}

func (c Chinese) say() {
	fmt.Println("哈喽")
}

func (a American) say() {
	fmt.Println("Hello")
}

func Great(s SayHallo) {
	s.say()
}

func main() {
	var s = [3]SayHallo{new(Chinese), new(Chinese), new(American)}
	for i := 0; i < len(s); i++ {
		Great(s[i])
	}
}
